<?php

class tSysUserAccount extends CActiveRecord
{
	/**
	 * The followings are the available columns in table 'sys_user_account':
	 * @var integer $ua_id
	 * @var string $ua_number
	 * @var integer $id_bank
	 * @var string $id_user
	 */

	/**
	 * Returns the static model of the specified AR class.
	 * @return CActiveRecord the static model class
	 */
	public static function model($className=__CLASS__)
	{
		return parent::model($className);
	}

	/**
	 * @return string the associated database table name
	 */
	public function tableName()
	{
		return 'sys_user_account';
	}

	/**
	 * @return array validation rules for model attributes.
	 */
	public function rules()
	{
		return array(
			array('ua_number','length','max'=>45),
			array('id_user','length','max'=>45),
			array('ua_number, id_bank, id_user', 'required'),
			array('id_bank', 'numerical', 'integerOnly'=>true),
		);
	}

	/**
	 * @return array relational rules.
	 */
	public function relations()
	{
		// NOTE: you may need to adjust the relation name and the related
		// class name for the relations automatically generated below.
		return array(
		);
	}

	/**
	 * @return array customized attribute labels (name=>label)
	 */
	public function attributeLabels()
	{
		return array(
			'ua_id' => 'Ua',
			'ua_number' => 'Ua Number',
			'id_bank' => 'Id Bank',
			'id_user' => 'Id User',
		);
	}
}